package zero.tech.games.jh.work.sync;

import zero.tech.core.work.AynWork;
import zero.tech.core.work.WorkManager;
import zero.tech.games.entity.games.Club;
import zero.tech.games.jh.work.queue.AfterGameOverCalculateQueueWork;
import zero.tech.games.logic.common.Room;

public class GameOverCalculateSyncWork extends AynWork{
	private Room room;
	private int bigcalsource;
	@Override
	public void init(Object... objs) throws Exception {
		room=(Room) objs[0];
		this.bigcalsource=(int) objs[1];
	}

	@Override
	public void run() {
		//结算代码在此处
		synchronized (room.getTransform_lock()) {
			bigCalculate(room);
			Club club=room.getClub();
			if(club!=null) {
				//结算代码在此处
				roomTransform(room);
			}
			WorkManager.getManager().submit(AfterGameOverCalculateQueueWork.class,room,bigcalsource);
		}
	}

	private void roomTransform(Room room2) {
		// TODO Auto-generated method stub
		
	}

	private void bigCalculate(Room room2) {
		// TODO Auto-generated method stub
		
	}

}
